/*
** my_strlcpy.c for galaf in /home/compilation/galaf-lib
** 
** Made by christophe labonnemartinez
** Login   <labonn_c@epitech.net>
** 
** Started on  Fri Mar 23 07:36:36 2012 christophe labonnemartinez
** Last update Sat Aug 11 12:40:37 2012 christophe labonnemartinez
*/

#include "includes/my.h"

int	my_strlcpy(char *dest, const char *from, int size)
{
  int	c;

  c = 0;
  while (dest[c])
    ++c;
  while (*from && (size - 1) > 0)
    {
      dest[c] = *from;
      ++c;
      ++from;
    }
  dest[c] = '\0';
  return (c);
}
